/*
 * @Author: Starfish_DL
 * @Date: 2020-09-30 22:46:34
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-09-30 22:47:43
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class test {
    public static void main(String argv[]) {
        Test t = new Test();
        t.first();
    }
    
    public void first() {
        int i = 5;	//first的变量i
        Value v = new Value();//v.i=15
        v.i = 25;		//v.i=25
        second(v, i);// 25, 5
        System.out.println(v.i);//20
    }

    public void second(Value v, int i) {//相当于copy了v的一个地址，里面的v可以看作v
        i = 0;				//i=0
        v.i = 20;//20!v指向的地址位置改成20
        Value val = new Value();//15
        v = val;//15
        System.out.println(v.i + " " + i);
    }
}
